<?php
$this->breadcrumbs=array(
	Yii::t('main','Services')=>array('service/'),
	$model->id,
);

$this->menu=array(
	//array('label'=>Yii::t('main','List'), 'url'=>array('index')),
	//array('label'=>Yii::t('main','Create'), 'url'=>array('create')),
	array('label'=>Yii::t('main','Update'), 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>Yii::t('main','Delete'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete', 'id'=>$model->id), 'confirm'=>Yii::t('main','Are you sure to delete this item?'))),
	array('label'=>Yii::t('main','Manage'), 'url'=>array('service/')),
);
?>

<h1><?php echo Yii::t('main','View').' #'.$model->id; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		array(
			'name'=>'user_contract',
			'value'=>$model->user->contract,
		),
		array(
			'name'=>'user_username',
			'value'=>$model->user->username,
		),
		array(
			'name'=>'type',
			'value'=>Lookup::item("ServiceType",$model->type),
		),
		'ip',
		'cost',
		array(
			'name'=>'packet_id',
			'value'=>$model->packet->name,
		),
		array(
			'name'=>'speed_id',
			'value'=>$model->speed->name,
		),
		'comment',
		'start_date',
		'end_date',
		'is_blocked',
		//'pay_date',
		//'last_pay_date',
		'is_active',
		'create_time',
		'update_time',
	),
)); ?>

<br />

<?php $this->widget('Portlet', array(
	'title'=>'Counters',
	'autoOpen'=>true,
	'url'=>$this->createUrl('counter',array('id'=>$model->id,'ajax'=>'counter-grid')),
	'id'=>'counter',
)); ?>